#ifndef COMB_MAPPINGPARSER_HPP__
#define COMB_MAPPINGPARSER_HPP__

#include<string>
#include<vector>
#include<fstream>

#include "util.hpp"

/** A parser for PerM output in color space. */
class ColorMappingParser
{
    public:
        ColorMappingParser(const char *fname);
        bool next_read(ColorRead &sr);
        
    private:
        std::ifstream fin;
        int total;
        
        // temp values for Read
        std::string id;
        std::string seq;
        std::vector<int> qual;
        std::vector<MapLoci> map_locs;
        int num;
        std::string qual_str;
        
        // temp values for MapLoci 
        std::string chr_id;
        int chr_pos;
        std::string chr_ref;
        char strand;
        int score;
};

/** A parser for PerM output in sequence space. */
class SequenceMappingParser 
{
    public:
        SequenceMappingParser(const char *fname);
        bool next_read(SeqRead &sr);
        
    private:
        std::ifstream fin;
        int total;
        
        // temp values for Read
        std::string id;
        std::string seq;
        std::vector<int> qual;
        std::vector<MapLoci> map_locs;
        int num;
        std::string qual_str;
        
        // temp values for MapLoci 
        std::string chr_id;
        int chr_pos;
        std::string chr_ref;
        char strand;
        int score;
};

#endif
